package com.ly.maven05.model;

import org.junit.*;

/**
 * Created by ly on 2018/3/8.
 */
public class AnnotationRunningOrder {


    @Before
    public void testBefore() {
        System.out.println("@Before");
    }

    @Test
    public void test() {
        System.out.println("@Test");
    }

    @Ignore
    @Test
    public void testIgnore() {
        System.out.println("@Ignore");
    }

    @Test(timeout = 50)
    public void testTimeout() {
        System.out.println("@Test(timeout = 50)");
        Assert.assertEquals(5+5, 10);
    }

    @Test(expected = ArithmeticException.class)
    public void testException() {
        System.out.println("@Test(expected = ArithmeticException.class)");
        throw new ArithmeticException();
    }

    @After
    public void testAfter() {
        System.out.println("@After");
    }

    @BeforeClass
    public static void testBeforeClass() {
        System.out.println("@BeforeClass");
    }

    @AfterClass
    public static void testAfterClass() {
        System.out.println("@AfterClass");
    }
}
